package com.zhj.springbootorderrabbitmqproducer.Conctroller;

import com.zhj.springbootorderrabbitmqproducer.pojo.Order;
import com.zhj.springbootorderrabbitmqproducer.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author zhj
 */
@RestController
@RequestMapping("/order")
public class OrderController {

    @Autowired
    private OrderService orderService;

    @GetMapping("/save")
    public String save() {
        orderService.createByTTL(new Order());
        return "下单成功";
    }
}
